<!--
 * @description: 
 * @Author: vikingShip
 * @Date: 2021-11-04 14:20:04
 * @LastEditors: vikingShip
 * @LastEditTime: 2022-01-07 10:48:21
-->
<template>
  <view>
    <u-popup :show="showType" mode="bottom" :customStyle="{height:'60%'}" @close="onClose">
      <select-norms :norms="norms" :goodDetail="goodDetail" @onClose="onClose" buyType="true" @addShopCar="addShopCar" @checkNorms="checkNorms" :shopCar="true" >
      </select-norms>
    </u-popup>
  </view>
</template>
<script lang='ts'>
  import {
    Component,
    Vue,
    Prop
  } from 'vue-property-decorator'
  import selectNorms from '@/components/select-norms/selectNorms.vue'
  import coupon from '@/components/couponCom/coupon/coupon.vue'
  @Component({
    components: {
      selectNorms,
      coupon
    }
  })
  export default class Sku extends Vue {
    @Prop()
    showType: boolean = false
    @Prop()
    goodDetail: any
    @Prop()
    norms: any
    onClose() {
      this.$store.commit('settingStore/setTabVisible', true);
      this.$store.commit('settingStore/setFormShopCar', false);
      this.$emit("close",{})
      this.showType=false
    }

    addShopCar(norms) {
      this.$emit("addShopCar", norms, {});
    }
    checkNorms(check){
      this.$emit("checkNorms", check)
    }
  }
</script>
<style lang="scss" scoped>
  .border {
    background: #F0F0F0;

    &__title {
      background-color: white;
      height: 50px;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 18px;
      font-weight: bold;
      margin-bottom: 20px;
    }
  }

  .coupon {
    color: black;
    display: flex;
    padding: 5px 20px;
  }
</style>